//
//  UIStyleSkinManager.m
//  etionUI
//
//  Created by wu jingxing on 13-2-18.
//  Copyright (c) 2013年 GuangZhouXuanWu. All rights reserved.
//

#import "UIStyleSkinManagerInternal.h"

@implementation CUIStyleSkin (Private)

- (id)initWithUIStyleSkin:(CUIStyleSkin *)uiss
{
    self=[super init];
    return self;
}

@end

@implementation CUIStyleSkinManager (Private)

static CSTSegmentedStyleSkin *s_stsegmentedss = nil;

static CNavigationBarStyleSkin *s_navbarss = nil;

static XUISearchBarStyleSkin *s_customsearchbarss = nil;

static CCustomTableViewStyleSkin *s_customtableviewss = nil;

static CRefreshHeaderViewStyleSkin *s_refreshheaderviewss = nil;

static CEmbeddedViewControllerStyleSkin *s_embeddedViewControllerss = nil;

static CPanToPrevViewControllerStyleSkin *s_panToPrevViewControllerss = nil;

static CTabViewStyleSkin *s_tabviewss = nil;

static CTabBarStyleSkin *s_tabbarss = nil;

static XUIGroupTableViewStyleSkin *s_groupTableViewss = nil;

+ (void)initUIStyleSkin:(EUIStyleSkinType)type UIStyleSkin:(CUIStyleSkin *)uiss
{
    switch ((NSInteger) type)
    {
        case EUIStyleSkinTypeSTsegmented:
        {
            s_stsegmentedss = [[CSTSegmentedStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeNavigationBar:
        {
            s_navbarss = [[CNavigationBarStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeCustomSearchBar:
        {
            s_customsearchbarss = [[XUISearchBarStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeCustomTableView:
        {
            s_customtableviewss = [[CCustomTableViewStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeRefreshHeaderView:
        {
            s_refreshheaderviewss = [[CRefreshHeaderViewStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeEmbeddedViewController:
        {
            s_embeddedViewControllerss = [[CEmbeddedViewControllerStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypePanToPrevViewController:
        {
            s_panToPrevViewControllerss = [[CPanToPrevViewControllerStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeTabView:
        {
            s_tabviewss = [[CTabViewStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case EUIStyleSkinTypeTabBar:
        {
            s_tabbarss = [[CTabBarStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
        case XUIStyleSkinTypeGroupTableView:
        {
            s_groupTableViewss = [[XUIGroupTableViewStyleSkin alloc] initWithUIStyleSkin:uiss];
            break;
        }
    }
}

+ (CSTSegmentedStyleSkin *)getSTSegmentedStyleSkin
{
    return s_stsegmentedss;
}

+ (CNavigationBarStyleSkin *)getNavigationBarStyleSkin
{
    return s_navbarss;
}

+ (XUISearchBarStyleSkin *)getCustomerBarBarStyleSkin
{
    return s_customsearchbarss;
}

+ (CCustomTableViewStyleSkin *)getCustomerTableViewStyleSkin
{
    return s_customtableviewss;
}

+ (CRefreshHeaderViewStyleSkin *)getRefreshHeaderViewStyleSkin
{
    return s_refreshheaderviewss;
}

+ (CEmbeddedViewControllerStyleSkin *)getEmbeddedViewControllerStyleSkin
{
    return s_embeddedViewControllerss;
}

+ (CPanToPrevViewControllerStyleSkin *)getPanToPrevViewControllerStyleSkin
{
    return s_panToPrevViewControllerss;
}

+(CTabViewStyleSkin *)getTabViewStyleSkin
{
    return s_tabviewss;
}

+(CTabBarStyleSkin *)getTabBarStyleSkin
{
    return s_tabbarss;
}

+ (XUIGroupTableViewStyleSkin *)getGroupTableViewStyleSkin
{
    return s_groupTableViewss;
}

@end